package com.opal.system.entity.table;

import java.util.ArrayList;
import java.util.List;

public class OpalDeptExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OpalDeptExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andDeptIdIsNull() {
            addCriterion("dept_id is null");
            return (Criteria) this;
        }

        public Criteria andDeptIdIsNotNull() {
            addCriterion("dept_id is not null");
            return (Criteria) this;
        }

        public Criteria andDeptIdEqualTo(Long value) {
            addCriterion("dept_id =", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotEqualTo(Long value) {
            addCriterion("dept_id <>", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdGreaterThan(Long value) {
            addCriterion("dept_id >", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdGreaterThanOrEqualTo(Long value) {
            addCriterion("dept_id >=", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdLessThan(Long value) {
            addCriterion("dept_id <", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdLessThanOrEqualTo(Long value) {
            addCriterion("dept_id <=", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdIn(List<Long> values) {
            addCriterion("dept_id in", values, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotIn(List<Long> values) {
            addCriterion("dept_id not in", values, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdBetween(Long value1, Long value2) {
            addCriterion("dept_id between", value1, value2, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotBetween(Long value1, Long value2) {
            addCriterion("dept_id not between", value1, value2, "deptId");
            return (Criteria) this;
        }

        public Criteria andPkDeptIsNull() {
            addCriterion("pk_dept is null");
            return (Criteria) this;
        }

        public Criteria andPkDeptIsNotNull() {
            addCriterion("pk_dept is not null");
            return (Criteria) this;
        }

        public Criteria andPkDeptEqualTo(String value) {
            addCriterion("pk_dept =", value, "pkDept");
            return (Criteria) this;
        }

        public Criteria andPkDeptNotEqualTo(String value) {
            addCriterion("pk_dept <>", value, "pkDept");
            return (Criteria) this;
        }

        public Criteria andPkDeptGreaterThan(String value) {
            addCriterion("pk_dept >", value, "pkDept");
            return (Criteria) this;
        }

        public Criteria andPkDeptGreaterThanOrEqualTo(String value) {
            addCriterion("pk_dept >=", value, "pkDept");
            return (Criteria) this;
        }

        public Criteria andPkDeptLessThan(String value) {
            addCriterion("pk_dept <", value, "pkDept");
            return (Criteria) this;
        }

        public Criteria andPkDeptLessThanOrEqualTo(String value) {
            addCriterion("pk_dept <=", value, "pkDept");
            return (Criteria) this;
        }

        public Criteria andPkDeptLike(String value) {
            addCriterion("pk_dept like", value, "pkDept");
            return (Criteria) this;
        }

        public Criteria andPkDeptNotLike(String value) {
            addCriterion("pk_dept not like", value, "pkDept");
            return (Criteria) this;
        }

        public Criteria andPkDeptIn(List<String> values) {
            addCriterion("pk_dept in", values, "pkDept");
            return (Criteria) this;
        }

        public Criteria andPkDeptNotIn(List<String> values) {
            addCriterion("pk_dept not in", values, "pkDept");
            return (Criteria) this;
        }

        public Criteria andPkDeptBetween(String value1, String value2) {
            addCriterion("pk_dept between", value1, value2, "pkDept");
            return (Criteria) this;
        }

        public Criteria andPkDeptNotBetween(String value1, String value2) {
            addCriterion("pk_dept not between", value1, value2, "pkDept");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgIsNull() {
            addCriterion("pk_fatherorg is null");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgIsNotNull() {
            addCriterion("pk_fatherorg is not null");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgEqualTo(String value) {
            addCriterion("pk_fatherorg =", value, "pkFatherorg");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgNotEqualTo(String value) {
            addCriterion("pk_fatherorg <>", value, "pkFatherorg");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgGreaterThan(String value) {
            addCriterion("pk_fatherorg >", value, "pkFatherorg");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgGreaterThanOrEqualTo(String value) {
            addCriterion("pk_fatherorg >=", value, "pkFatherorg");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgLessThan(String value) {
            addCriterion("pk_fatherorg <", value, "pkFatherorg");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgLessThanOrEqualTo(String value) {
            addCriterion("pk_fatherorg <=", value, "pkFatherorg");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgLike(String value) {
            addCriterion("pk_fatherorg like", value, "pkFatherorg");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgNotLike(String value) {
            addCriterion("pk_fatherorg not like", value, "pkFatherorg");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgIn(List<String> values) {
            addCriterion("pk_fatherorg in", values, "pkFatherorg");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgNotIn(List<String> values) {
            addCriterion("pk_fatherorg not in", values, "pkFatherorg");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgBetween(String value1, String value2) {
            addCriterion("pk_fatherorg between", value1, value2, "pkFatherorg");
            return (Criteria) this;
        }

        public Criteria andPkFatherorgNotBetween(String value1, String value2) {
            addCriterion("pk_fatherorg not between", value1, value2, "pkFatherorg");
            return (Criteria) this;
        }

        public Criteria andNameIsNull() {
            addCriterion("name is null");
            return (Criteria) this;
        }

        public Criteria andNameIsNotNull() {
            addCriterion("name is not null");
            return (Criteria) this;
        }

        public Criteria andNameEqualTo(String value) {
            addCriterion("name =", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotEqualTo(String value) {
            addCriterion("name <>", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThan(String value) {
            addCriterion("name >", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThanOrEqualTo(String value) {
            addCriterion("name >=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThan(String value) {
            addCriterion("name <", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThanOrEqualTo(String value) {
            addCriterion("name <=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLike(String value) {
            addCriterion("name like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotLike(String value) {
            addCriterion("name not like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameIn(List<String> values) {
            addCriterion("name in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotIn(List<String> values) {
            addCriterion("name not in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameBetween(String value1, String value2) {
            addCriterion("name between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotBetween(String value1, String value2) {
            addCriterion("name not between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andCodeIsNull() {
            addCriterion("code is null");
            return (Criteria) this;
        }

        public Criteria andCodeIsNotNull() {
            addCriterion("code is not null");
            return (Criteria) this;
        }

        public Criteria andCodeEqualTo(String value) {
            addCriterion("code =", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotEqualTo(String value) {
            addCriterion("code <>", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeGreaterThan(String value) {
            addCriterion("code >", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeGreaterThanOrEqualTo(String value) {
            addCriterion("code >=", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeLessThan(String value) {
            addCriterion("code <", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeLessThanOrEqualTo(String value) {
            addCriterion("code <=", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeLike(String value) {
            addCriterion("code like", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotLike(String value) {
            addCriterion("code not like", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeIn(List<String> values) {
            addCriterion("code in", values, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotIn(List<String> values) {
            addCriterion("code not in", values, "code");
            return (Criteria) this;
        }

        public Criteria andCodeBetween(String value1, String value2) {
            addCriterion("code between", value1, value2, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotBetween(String value1, String value2) {
            addCriterion("code not between", value1, value2, "code");
            return (Criteria) this;
        }

        public Criteria andAcronymIsNull() {
            addCriterion("acronym is null");
            return (Criteria) this;
        }

        public Criteria andAcronymIsNotNull() {
            addCriterion("acronym is not null");
            return (Criteria) this;
        }

        public Criteria andAcronymEqualTo(String value) {
            addCriterion("acronym =", value, "acronym");
            return (Criteria) this;
        }

        public Criteria andAcronymNotEqualTo(String value) {
            addCriterion("acronym <>", value, "acronym");
            return (Criteria) this;
        }

        public Criteria andAcronymGreaterThan(String value) {
            addCriterion("acronym >", value, "acronym");
            return (Criteria) this;
        }

        public Criteria andAcronymGreaterThanOrEqualTo(String value) {
            addCriterion("acronym >=", value, "acronym");
            return (Criteria) this;
        }

        public Criteria andAcronymLessThan(String value) {
            addCriterion("acronym <", value, "acronym");
            return (Criteria) this;
        }

        public Criteria andAcronymLessThanOrEqualTo(String value) {
            addCriterion("acronym <=", value, "acronym");
            return (Criteria) this;
        }

        public Criteria andAcronymLike(String value) {
            addCriterion("acronym like", value, "acronym");
            return (Criteria) this;
        }

        public Criteria andAcronymNotLike(String value) {
            addCriterion("acronym not like", value, "acronym");
            return (Criteria) this;
        }

        public Criteria andAcronymIn(List<String> values) {
            addCriterion("acronym in", values, "acronym");
            return (Criteria) this;
        }

        public Criteria andAcronymNotIn(List<String> values) {
            addCriterion("acronym not in", values, "acronym");
            return (Criteria) this;
        }

        public Criteria andAcronymBetween(String value1, String value2) {
            addCriterion("acronym between", value1, value2, "acronym");
            return (Criteria) this;
        }

        public Criteria andAcronymNotBetween(String value1, String value2) {
            addCriterion("acronym not between", value1, value2, "acronym");
            return (Criteria) this;
        }

        public Criteria andPkOrgIsNull() {
            addCriterion("pk_org is null");
            return (Criteria) this;
        }

        public Criteria andPkOrgIsNotNull() {
            addCriterion("pk_org is not null");
            return (Criteria) this;
        }

        public Criteria andPkOrgEqualTo(String value) {
            addCriterion("pk_org =", value, "pkOrg");
            return (Criteria) this;
        }

        public Criteria andPkOrgNotEqualTo(String value) {
            addCriterion("pk_org <>", value, "pkOrg");
            return (Criteria) this;
        }

        public Criteria andPkOrgGreaterThan(String value) {
            addCriterion("pk_org >", value, "pkOrg");
            return (Criteria) this;
        }

        public Criteria andPkOrgGreaterThanOrEqualTo(String value) {
            addCriterion("pk_org >=", value, "pkOrg");
            return (Criteria) this;
        }

        public Criteria andPkOrgLessThan(String value) {
            addCriterion("pk_org <", value, "pkOrg");
            return (Criteria) this;
        }

        public Criteria andPkOrgLessThanOrEqualTo(String value) {
            addCriterion("pk_org <=", value, "pkOrg");
            return (Criteria) this;
        }

        public Criteria andPkOrgLike(String value) {
            addCriterion("pk_org like", value, "pkOrg");
            return (Criteria) this;
        }

        public Criteria andPkOrgNotLike(String value) {
            addCriterion("pk_org not like", value, "pkOrg");
            return (Criteria) this;
        }

        public Criteria andPkOrgIn(List<String> values) {
            addCriterion("pk_org in", values, "pkOrg");
            return (Criteria) this;
        }

        public Criteria andPkOrgNotIn(List<String> values) {
            addCriterion("pk_org not in", values, "pkOrg");
            return (Criteria) this;
        }

        public Criteria andPkOrgBetween(String value1, String value2) {
            addCriterion("pk_org between", value1, value2, "pkOrg");
            return (Criteria) this;
        }

        public Criteria andPkOrgNotBetween(String value1, String value2) {
            addCriterion("pk_org not between", value1, value2, "pkOrg");
            return (Criteria) this;
        }

        public Criteria andPkVidIsNull() {
            addCriterion("pk_vid is null");
            return (Criteria) this;
        }

        public Criteria andPkVidIsNotNull() {
            addCriterion("pk_vid is not null");
            return (Criteria) this;
        }

        public Criteria andPkVidEqualTo(String value) {
            addCriterion("pk_vid =", value, "pkVid");
            return (Criteria) this;
        }

        public Criteria andPkVidNotEqualTo(String value) {
            addCriterion("pk_vid <>", value, "pkVid");
            return (Criteria) this;
        }

        public Criteria andPkVidGreaterThan(String value) {
            addCriterion("pk_vid >", value, "pkVid");
            return (Criteria) this;
        }

        public Criteria andPkVidGreaterThanOrEqualTo(String value) {
            addCriterion("pk_vid >=", value, "pkVid");
            return (Criteria) this;
        }

        public Criteria andPkVidLessThan(String value) {
            addCriterion("pk_vid <", value, "pkVid");
            return (Criteria) this;
        }

        public Criteria andPkVidLessThanOrEqualTo(String value) {
            addCriterion("pk_vid <=", value, "pkVid");
            return (Criteria) this;
        }

        public Criteria andPkVidLike(String value) {
            addCriterion("pk_vid like", value, "pkVid");
            return (Criteria) this;
        }

        public Criteria andPkVidNotLike(String value) {
            addCriterion("pk_vid not like", value, "pkVid");
            return (Criteria) this;
        }

        public Criteria andPkVidIn(List<String> values) {
            addCriterion("pk_vid in", values, "pkVid");
            return (Criteria) this;
        }

        public Criteria andPkVidNotIn(List<String> values) {
            addCriterion("pk_vid not in", values, "pkVid");
            return (Criteria) this;
        }

        public Criteria andPkVidBetween(String value1, String value2) {
            addCriterion("pk_vid between", value1, value2, "pkVid");
            return (Criteria) this;
        }

        public Criteria andPkVidNotBetween(String value1, String value2) {
            addCriterion("pk_vid not between", value1, value2, "pkVid");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}